package com.tmt.im.service.controller.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.tmt.im.common.enums.ChatSessionType;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 聊天群组列表项信息
 *
 * @Description TODO
 * @Author wuyi
 * @Date 2024/8/6 19:50
 * @Version 1.0
 **/
@Getter
@Setter
@Tag(name = "用户加入的群组项信息", description = "用户加入的群组项信息")
public class ChatSessionDetailVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1736495116114821063L;

    @Schema(description = "群组ID")
    @JsonProperty("groupId")
    private Long id;

    /**
     * 聊天会话的类型。
     */
    @Schema(description = "群组类型")
    private ChatSessionType type = ChatSessionType.DOUBLE;

    /**
     * 群头像
     */
    @Schema(description = "群组头像")
    @JsonProperty("head")
    private String avatar;

    /**
     * 群聊名称。双人会话类型时，名称默认为对方的昵称。
     */
    @Schema(description = "群组名称")
    private String name;

    @Schema(description = "群组公告")
    private String announcement;

    /**
     * 当前用户在群中的昵称
     */
    @Schema(description = "当前用户在群中的昵称")
    @JsonProperty("userGroupName")
    private String memberNick;

    @Schema(description = "当前用户在群中的角色")
    @JsonProperty("rankState")
    private int roleInSession;

    @Schema(description = "群主ID")
    private Long ownerId;

    @Schema(description = "入群是否免审核——true:免审核。false:需要审核")
    private boolean inviteState = false;

    @Schema(description = "群成员是否允许互相添加好友——true:允许。false:禁止")
    @JsonProperty("addFriendsState")
    private boolean forbidAddFriend = false;

    @Schema(description = "整群的禁言状态——true:解除禁言。false:禁言")
    private boolean shutupState = true;

    @Schema(description = "抢手气红包状态——true:允许抢红包。false:禁止抢红包")
    private boolean nonCollectionState = true;

    @Schema(description = "群成员略表，只返回前面20是个")
    private List<MemberInfo> members;

}
